Skip to content

Conversation

@ndim
Copy link
Contributor

@ndim ndim commented Feb 15, 2024

This cleans up libavrdude.h a bit and installs libavrdude-avrintel.h:

  • libavrdude.h will create an error if LIBAVRDUDE_INCLUDE_INTERNAL_HEADERS is defined
  • add comment on top of libavrdude-avrintel.h about not directly #includeing it
  • install libavrdude-avrintel.h alongside libavrdude.h (both cmake and autotools)
  • use proper C99 and later definitions for a C function without parameters: rettype funcname(void);
  • have the libavrdude.h/libavrdude-avrintel.h combination #include all required libc headers declaring the types used in them (add stddef.h for size_t)

Test programs for testing language compatibility will come later when I figure out how to build them in cmake. A program like the following should build with all compilers and all supported language standards:

#include <libavrdude.h>

int main(void) {
  return 0;
}

ndim added 4 commits February 15, 2024 00:42
As libavrdude-avrintel.h uses not only uint32_t and related
types from stdint.h, but also size_t from stddef.h, we also
need to #include the latter into libavrdude.h before
libavrdude.h includes libavrdude-avrintel.h
@ndim ndim marked this pull request as ready for review February 15, 2024 00:04
@mcuee mcuee added bug Something isn't working enhancement New feature or request labels Feb 15, 2024
@mcuee
Copy link
Collaborator

mcuee commented Feb 15, 2024

From github action, it seems to be good under Linux (CMake and auto-tools).

I have also tested this under macOS.

I think this PR is good to go and it finally fixes #1683.

@mcuee mcuee added this to the AVRDUDE 7.4 milestone Feb 16, 2024
@stefanrueger
Copy link
Collaborator

I have reviewed the changes in this PR, and they look good to me. Happy to merge at next mergefest (we tend to let PR lie around for a few days and normally wait to merge them until a few ones are ready)

@stefanrueger stefanrueger merged commit 4b7da29 into avrdudes:main Feb 23, 2024
@ndim ndim deleted the libavrdude.h branch February 23, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants